/*******************************************************************************
* Copyright 2017 CLNST CO., LTD.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#ifndef __GPS_DRIVER_H__
#define __GPS_DRIVER_H__

#include <ros/ros.h>
#include <std_msgs/String.h>
#include <nmea_msgs/Sentence.h>
#include <nmea_msgs/Gprmc.h>
#include "gps_driver/Gprmc_pro.h"
 
 # include <stdio.h>
# include <stdlib.h>
#include <iostream>
#include <math.h>
#include <string.h>
#include <sstream>

typedef struct{
    unsigned int time;                          //UTC 时间，hhmmss（时分秒）格式
    unsigned char state;                     //定位状态，A=有效定位，V=无效定位
    float latitude;                                     //纬度 ddmm.mmmm（度分）格式
    float longitude;                                //经度 dddmm.mmmm（度分）格式
    float altitude;                                  //海拔高度 单位：米
    float speed;                                        //地面速率 000.0~999.9 节
    float track;                                        //地面航向000.0~359.9 度，以真北为参考基准
    unsigned int date;                          //UTC 日期，ddmmyy（日月年）格式
    float magnetic;                                 //磁偏角000.0~180.0 度
    unsigned char magnetic_dir;     //磁偏角方向，E（东）或 W（西）模式指示（仅 NMEA0183 3.00 版本
    unsigned char mode;                     //模式指示 A=自主定位，D=差分，E=估算，N=数据无效）
    unsigned int checksum;


}gps_RMC;

#endif// __GPS_DRIVER_H__